import request from '@/utils/request'

const api_name = '/eduservice/frontCourse'

export default {
  // getPageList(page,limit,seacherObj){
  //   return request({
  //     url: `${api_name}/pageListWeb/${page}/${limit}`,
  //     method: 'post',
  //     data: seacherObj
  // })
  // },
  getPageList(page,limit,seacherObj){
    return request({
      url: `/edu/elasticsearch/list/${page}/${limit}`,
      method: 'post',
      data: seacherObj
    })
  },
  // 获取课程二级分类
  getAllSubject(){
    return request({
      url: '/eduservice/subject/allList',
      method: 'get'
    })
  },
  getById(courseId){
    return request({
      url: `${api_name}/${courseId}`,
      method: 'get'
    })
  }
}
